package com.heaven.customerServer.customerController.vo.video;

import com.heaven.constant.VideoConstants;
import com.heaven.validation.EnumValue;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

@Data
public class PlayCountReq {

    @NotBlank(message = "videoId不能为空")
    private String videoId;

    /**
     * 请求类型
     *  1：获取播放token
     *  2：视频播放
     *  3：视频暂停
     *  4：跳出播放页面
     */
    @NotNull(message = "type不能为空")
    @EnumValue(intValues = {VideoConstants.PLAY_COUNT_REQ_TYPE_TOKEN, VideoConstants.PLAY_COUNT_REQ_TYPE_START,
            VideoConstants.PLAY_COUNT_REQ_TYPE_PLAY,
            VideoConstants.PLAY_COUNT_REQ_TYPE_PAUSE, VideoConstants.PLAY_COUNT_REQ_TYPE_ENDED})
    private int type;

    private String token;
}
